<% content_for :stylesheet_head do %>
        <style>
          .bu,button.button,tr td button {
                padding: 2px 10px;
                margin: 0px 10px;
                background: #009bce;
                border-radius: 4px;
                border: 1px;
                color: #fff;
            }
        </style>
<% end %>
    <div class="listFilter" style="margin: 20px;">
      <h2>入住审核</h2>
      <div class="divider"></div>
       <%= form_for_filterrific @filterrific do |f| %>
            <table style="width: 100%;" class="list_table">
                  <tbody>
                    <tr>
                        <td>开始时间:</td><td><%= f.text_field :with_upload_time_begin,onclick:"SelectDate(this,'yyyy-MM-dd hh:mm:ss')"%></td>                        
                        <td>结束时间:</td> <td><%= f.text_field :with_upload_time_end,onclick:"SelectDate(this,'yyyy-MM-dd hh:mm:ss')"%></td>                       
                        <td>入住酒店:</td><td><%= f.select :with_hotel_address_id,hotel_list_name ,{:include_blank => true}%></td>       
                    </tr>

                    <tr>
                       <td>姓名:</td><td><%= f.text_field   :with_name %></td>
                       <td>身份证:</td><td><%= f.text_field :with_idcard %></td>
                       <td>手机:</td><td><%= f.text_field   :with_phone %></td> 
                    </tr>

                     <tr>
                        <td>状态:</td><td><%= f.select  :with_status,[['全部',''],['未审核','未审核'],['已审核','已审核']] %></td> 
                        <td></td>
                        <td><%= f.submit "查询", :class=>"button" %></td> 
                    </tr>
                  </tbody>
            </table>
        <% end %>
      <div class="list_table" >
        <table class="bb list_table"  cellspacing="0" style="text-align:left" >
          <thead>
            <tr>
              <th width='1%'>序号</th>
              <th width='1%'>酒店名称</th>
              <th width='1%'>房客</th>
              <th width='1%'>照片</th>
              <th width='1%'>手机号</th>
              <th width='1%'>性别</th>
              <th width='1%'>身份证</th>
              <th width='1%'>状态</th>
              <th width='1%'>登记时间</th>
              <th width='1%'>审核人</th>
              <th width='1%'>操作</th>
            </tr>
          </thead>
          <tbody id="tbody">
          <%  if @record_data != nil
             odd_or_even = 0
             tmp=0
            @record_data.each do |hotels|
               tmp = tmp+1
          -%>
                  <tr class="odd_row">
                      <td><%= h(tmp) %></td>
                      <td><%= get_hotel_info_name(hotels.hotel_address_id) %></td>
                      <td><%= hotels.name %></td>
                      <td><img src="<%=get_pic_url(hotels.id,hotels.pic)%>" alt="图片丢失" style="width:50px;height:40px"></td>
                      <td><%= hotels.phone %></td>
                      <td><%= hotels.sex %></td>
                      <td><%= hotels.idcard %></td>
                      <td><%= hotels.status %></td>
                      <td><%= hotels.upload_time.strftime("%Y-%m-%d %H:%M:%S") %></td>
                      <td><%= hotels.check_person %></td>
                      <td >  
                        <% if  hotels.status=='未审核' %>                
                          <%= link_to "审核",record_datum_path(hotels),{style:"color:red",method: :delete, data: { confirm: '通过审核?' } } %>
                        <%else%>
                           已审核
                        <%end%>
                    </td>
                 </tr>
            <% end %>
            <% end %>
          <tr>
            <td colspan="11">
               <%= will_paginate(@record_data ,:previous_label=>'上一页',:next_label=>'下一页')  %>
            </td>
         </tr>
          </tbody>
        </table>
        <div class="WhereToLinks"></div>
      </div>
    </div>
    <% content_for :javascript_head do %>  
    <% end %>
